feat(yoco): E4B-it H100 bench results + per-prompt parity (PR-C/3) - #13
Draft
pyc96 wants to merge 1 commit into
Draft
feat(yoco): E4B-it H100 bench results + per-prompt parity (PR-C/3)#13pyc96 wants to merge 1 commit into
pyc96 wants to merge 1 commit into
Conversation
Adds the planning and bench artifacts for the YOCO fast-prefill stack
(PR-A flag plumbing, PR-B model branch, PR-C this PR with results).
E4B-it on H100 TP=2, triton attention backend, num_prompts=80, seed 1,
warmup 2:
Scenario | YOCO off | YOCO on | Delta
-----------------|---------:|----------:|--------
summ tok/s | 3469.6 | **4078.5**| **+17.6 %**
summ med TTFT ms | 5920.3 | **4276.1**| **-27.8 %**
summ p99 TTFT ms | 11550.5 | **8144.6**| **-29.5 %**
summ med TPOT ms | 17.1 | **15.3** | **-10.5 %**
chat tok/s | 9327.5 | **9520.2**| **+2.1 %**
chat med TTFT ms | 618.0 | **557.7** | **-9.8 %**
chat p99 TTFT ms | 1032.1 | **856.3** | **-17.0 %**
chat med TPOT ms | 7.9 | 7.8 | -1.3 %
Correctness:
- per-prompt parity test: 20/20 prompts byte-identical under greedy
sampling between YOCO-off and YOCO-on servers
- MMLU N=500 seed 0 temp 0:
YOCO off: 0.594 (297/500)
YOCO on: 0.592 (296/500)
Delta = -0.2 pp (1 question difference; within the +/-1 pp bar)
Server log confirms the flag fires correctly:
KV-sharing fast prefill enabled for Gemma4ForConditionalGeneration
(num_kv_shared_layers=18).
Files added:
.humanize/yoco-gemma4/draft.md — original design draft
.humanize/yoco-gemma4/refined-plan.md — structured plan with AC-1..8
.humanize/yoco-gemma4/bench-results-e4b-h100.md — this run
The two SGLang server commands are documented in the bench-results file
along with the per-prompt parity test reproducer.
PCG note: both servers in this run pass --disable-piecewise-cuda-graph.
This works around a pre-existing SGLang bug where
radix_attention.unified_attention_with_output unconditionally slices
'key[:real_num_tokens]', crashing when key is None for KV-shared layers
under PCG. That bug is orthogonal to YOCO (it affects YOCO-off too on
E4B; it only didn't bite the 26b/31b campaign because those models have
num_kv_shared_layers=0). Filed-but-not-fixed in this stack.
Stack base: pyc/yoco-fast-prefill-impl @ cead77a
Plan: .humanize/yoco-gemma4/refined-plan.md
Co-authored-by: Claude
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Final PR in the 3-PR YOCO fast-prefill stack. Adds the planning artifacts and bench/quality results for
google/gemma-4-E4B-iton H100 TP=2.Stack:
Gemma4TextModel+ 16 unit testsHeadline numbers (E4B-it, H100 TP=2, triton, 80 prompts, seed 1)
summ 8000/1000 n=80 (target YOCO workload)
chat 1000/1000 n=80
Correctness — MMLU N=500 (seed 0, temp 0)
Δ = −0.2 pp (1 question difference, within ±1 pp).
Correctness — per-prompt parity (20 prompts, greedy, temperature=0)
{ "total": 20, "matched": 20, "mismatched": 0, "match_rate": 1.0 }Every prompt produces byte-identical output under YOCO-on vs YOCO-off. Strongest correctness oracle: no token diverges.
Why summ wins so much more than chat
YOCO eliminates back-half compute proportional to
(input_len − 1) × num_kv_shared_layers / num_hidden_layers:num_kv_shared_layers = 18,num_hidden_layers = 42→ 43 % of layersEmpirically matches: chat +2 %, summ +18 %.
What's in PR-C
Three docs added under
.humanize/yoco-gemma4/:draft.md— original design draft (~280 lines)refined-plan.md— structured plan with 8 acceptance criteria (~280 lines)bench-results-e4b-h100.md— full bench results + reproducer commands (~140 lines)Reproducer
PCG note
Both servers in this run pass
--disable-piecewise-cuda-graph. This works around a pre-existing SGLang bug whereradix_attention.unified_attention_with_outputunconditionally sliceskey[:real_num_tokens], crashing whenkey is Nonefor KV-shared layers under PCG. The bug is orthogonal to YOCO (it affects YOCO-off too on E4B). It only didn't bite the 26b/31b campaign because those models havenum_kv_shared_layers = 0. Filed but not fixed in this stack.Acceptance criteria check
All 8 acceptance criteria from the refined plan met:
pyc96/sglang(feat(yoco): add --kv-sharing-fast-prefill server arg + validators (PR-A/3) #11, feat(yoco): implement YOCO fast-prefill branch in Gemma4TextModel (PR-B/3) #12, this one)Stack base
pyc/yoco-fast-prefill-impl@cead77a08Plan:
.humanize/yoco-gemma4/refined-plan.mdCI States
Latest PR Test (Base): ❌ Missing
run-cilabel -- add it to run CI tests.Latest PR Test (Extra): ❌ Blocked --
run-ciis required first.